3.9 \(\int \frac{(a+b x)^2 \sqrt{c+d x} (e+f x)}{x} \, dx\)

Optimal. Leaf size=146 \[ \frac{2 (c+d x)^{3/2} \left (2 \left (10 a^2 d^2 f+7 a b d (5 d e-2 c f)+b^2 (-c) (7 d e-4 c f)\right )+3 b d x (4 a d f-4 b c f+7 b d e)\right )}{105 d^3}+2 a^2 e \sqrt{c+d x}-2 a^2 \sqrt{c} e \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )+\frac{2 f (a+b x)^2 (c+d x)^{3/2}}{7 d} \]

[Out]

2*a^2*e*Sqrt[c + d*x] + (2*f*(a + b*x)^2*(c + d*x)^(3/2))/(7*d) + (2*(c + d*x)^(3/2)*(2*(10*a^2*d^2*f - b^2*c*
(7*d*e - 4*c*f) + 7*a*b*d*(5*d*e - 2*c*f)) + 3*b*d*(7*b*d*e - 4*b*c*f + 4*a*d*f)*x))/(105*d^3) - 2*a^2*Sqrt[c]
*e*ArcTanh[Sqrt[c + d*x]/Sqrt[c]]

________________________________________________________________________________________

Rubi [A]  time = 0.0981034, antiderivative size = 146, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {153, 147, 50, 63, 208} \[ \frac{2 (c+d x)^{3/2} \left (2 \left (10 a^2 d^2 f+7 a b d (5 d e-2 c f)+b^2 (-c) (7 d e-4 c f)\right )+3 b d x (4 a d f-4 b c f+7 b d e)\right )}{105 d^3}+2 a^2 e \sqrt{c+d x}-2 a^2 \sqrt{c} e \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )+\frac{2 f (a+b x)^2 (c+d x)^{3/2}}{7 d} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x)^2*Sqrt[c + d*x]*(e + f*x))/x,x]

[Out]

2*a^2*e*Sqrt[c + d*x] + (2*f*(a + b*x)^2*(c + d*x)^(3/2))/(7*d) + (2*(c + d*x)^(3/2)*(2*(10*a^2*d^2*f - b^2*c*
(7*d*e - 4*c*f) + 7*a*b*d*(5*d*e - 2*c*f)) + 3*b*d*(7*b*d*e - 4*b*c*f + 4*a*d*f)*x))/(105*d^3) - 2*a^2*Sqrt[c]
*e*ArcTanh[Sqrt[c + d*x]/Sqrt[c]]

Rule 153

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Simp[(h*(a + b*x)^m*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(d*f*(m + n + p + 2)), x] + Dist[1/(d*f*(m + n
 + p + 2)), Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2) - h*(b*c*e*m + a*(d*e*(
n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) + h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x]
, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] && IntegerQ[m]

Rule 147

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))*((g_.) + (h_.)*(x_)), x_Symbol]
:> -Simp[((a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x)*(a + b*x)^
(m + 1)*(c + d*x)^(n + 1))/(b^2*d^2*(m + n + 2)*(m + n + 3)), x] + Dist[(a^2*d^2*f*h*(n + 1)*(n + 2) + a*b*d*(
n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*
(m + n + 3) + d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3)), Int[(a + b*x)^m*(c + d*x)^n
, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(a+b x)^2 \sqrt{c+d x} (e+f x)}{x} \, dx &=\frac{2 f (a+b x)^2 (c+d x)^{3/2}}{7 d}+\frac{2 \int \frac{(a+b x) \sqrt{c+d x} \left (\frac{7 a d e}{2}+\frac{1}{2} (7 b d e-4 b c f+4 a d f) x\right )}{x} \, dx}{7 d}\\ &=\frac{2 f (a+b x)^2 (c+d x)^{3/2}}{7 d}+\frac{2 (c+d x)^{3/2} \left (2 \left (10 a^2 d^2 f-b^2 c (7 d e-4 c f)+7 a b d (5 d e-2 c f)\right )+3 b d (7 b d e-4 b c f+4 a d f) x\right )}{105 d^3}+\left (a^2 e\right ) \int \frac{\sqrt{c+d x}}{x} \, dx\\ &=2 a^2 e \sqrt{c+d x}+\frac{2 f (a+b x)^2 (c+d x)^{3/2}}{7 d}+\frac{2 (c+d x)^{3/2} \left (2 \left (10 a^2 d^2 f-b^2 c (7 d e-4 c f)+7 a b d (5 d e-2 c f)\right )+3 b d (7 b d e-4 b c f+4 a d f) x\right )}{105 d^3}+\left (a^2 c e\right ) \int \frac{1}{x \sqrt{c+d x}} \, dx\\ &=2 a^2 e \sqrt{c+d x}+\frac{2 f (a+b x)^2 (c+d x)^{3/2}}{7 d}+\frac{2 (c+d x)^{3/2} \left (2 \left (10 a^2 d^2 f-b^2 c (7 d e-4 c f)+7 a b d (5 d e-2 c f)\right )+3 b d (7 b d e-4 b c f+4 a d f) x\right )}{105 d^3}+\frac{\left (2 a^2 c e\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{c}{d}+\frac{x^2}{d}} \, dx,x,\sqrt{c+d x}\right )}{d}\\ &=2 a^2 e \sqrt{c+d x}+\frac{2 f (a+b x)^2 (c+d x)^{3/2}}{7 d}+\frac{2 (c+d x)^{3/2} \left (2 \left (10 a^2 d^2 f-b^2 c (7 d e-4 c f)+7 a b d (5 d e-2 c f)\right )+3 b d (7 b d e-4 b c f+4 a d f) x\right )}{105 d^3}-2 a^2 \sqrt{c} e \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )\\ \end{align*}

Mathematica [A]  time = 0.17611, size = 145, normalized size = 0.99 \[ \frac{2 \left (7 d e \left (\sqrt{c+d x} \left (15 a^2 d^2+10 a b d (c+d x)+b^2 \left (-2 c^2+c d x+3 d^2 x^2\right )\right )-15 a^2 \sqrt{c} d^2 \tanh ^{-1}\left (\frac{\sqrt{c+d x}}{\sqrt{c}}\right )\right )+f (c+d x)^{3/2} \left (-42 b (c+d x) (b c-a d)+35 (b c-a d)^2+15 b^2 (c+d x)^2\right )\right )}{105 d^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)^2*Sqrt[c + d*x]*(e + f*x))/x,x]

[Out]

(2*(f*(c + d*x)^(3/2)*(35*(b*c - a*d)^2 - 42*b*(b*c - a*d)*(c + d*x) + 15*b^2*(c + d*x)^2) + 7*d*e*(Sqrt[c + d
*x]*(15*a^2*d^2 + 10*a*b*d*(c + d*x) + b^2*(-2*c^2 + c*d*x + 3*d^2*x^2)) - 15*a^2*Sqrt[c]*d^2*ArcTanh[Sqrt[c +
 d*x]/Sqrt[c]])))/(105*d^3)

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 176, normalized size = 1.2 \begin{align*} 2\,{\frac{1}{{d}^{3}} \left ( 1/7\,{b}^{2}f \left ( dx+c \right ) ^{7/2}+2/5\, \left ( dx+c \right ) ^{5/2}abdf-2/5\, \left ( dx+c \right ) ^{5/2}{b}^{2}cf+1/5\, \left ( dx+c \right ) ^{5/2}{b}^{2}de+1/3\, \left ( dx+c \right ) ^{3/2}{a}^{2}{d}^{2}f-2/3\, \left ( dx+c \right ) ^{3/2}abcdf+2/3\, \left ( dx+c \right ) ^{3/2}ab{d}^{2}e+1/3\, \left ( dx+c \right ) ^{3/2}{b}^{2}{c}^{2}f-1/3\, \left ( dx+c \right ) ^{3/2}{b}^{2}cde+{a}^{2}{d}^{3}e\sqrt{dx+c}-{a}^{2}\sqrt{c}{d}^{3}e{\it Artanh} \left ({\frac{\sqrt{dx+c}}{\sqrt{c}}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^2*(f*x+e)*(d*x+c)^(1/2)/x,x)

[Out]

2/d^3*(1/7*b^2*f*(d*x+c)^(7/2)+2/5*(d*x+c)^(5/2)*a*b*d*f-2/5*(d*x+c)^(5/2)*b^2*c*f+1/5*(d*x+c)^(5/2)*b^2*d*e+1
/3*(d*x+c)^(3/2)*a^2*d^2*f-2/3*(d*x+c)^(3/2)*a*b*c*d*f+2/3*(d*x+c)^(3/2)*a*b*d^2*e+1/3*(d*x+c)^(3/2)*b^2*c^2*f
-1/3*(d*x+c)^(3/2)*b^2*c*d*e+a^2*d^3*e*(d*x+c)^(1/2)-a^2*c^(1/2)*d^3*e*arctanh((d*x+c)^(1/2)/c^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(f*x+e)*(d*x+c)^(1/2)/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.83759, size = 914, normalized size = 6.26 \begin{align*} \left [\frac{105 \, a^{2} \sqrt{c} d^{3} e \log \left (\frac{d x - 2 \, \sqrt{d x + c} \sqrt{c} + 2 \, c}{x}\right ) + 2 \,{\left (15 \, b^{2} d^{3} f x^{3} + 3 \,{\left (7 \, b^{2} d^{3} e +{\left (b^{2} c d^{2} + 14 \, a b d^{3}\right )} f\right )} x^{2} - 7 \,{\left (2 \, b^{2} c^{2} d - 10 \, a b c d^{2} - 15 \, a^{2} d^{3}\right )} e +{\left (8 \, b^{2} c^{3} - 28 \, a b c^{2} d + 35 \, a^{2} c d^{2}\right )} f +{\left (7 \,{\left (b^{2} c d^{2} + 10 \, a b d^{3}\right )} e -{\left (4 \, b^{2} c^{2} d - 14 \, a b c d^{2} - 35 \, a^{2} d^{3}\right )} f\right )} x\right )} \sqrt{d x + c}}{105 \, d^{3}}, \frac{2 \,{\left (105 \, a^{2} \sqrt{-c} d^{3} e \arctan \left (\frac{\sqrt{d x + c} \sqrt{-c}}{c}\right ) +{\left (15 \, b^{2} d^{3} f x^{3} + 3 \,{\left (7 \, b^{2} d^{3} e +{\left (b^{2} c d^{2} + 14 \, a b d^{3}\right )} f\right )} x^{2} - 7 \,{\left (2 \, b^{2} c^{2} d - 10 \, a b c d^{2} - 15 \, a^{2} d^{3}\right )} e +{\left (8 \, b^{2} c^{3} - 28 \, a b c^{2} d + 35 \, a^{2} c d^{2}\right )} f +{\left (7 \,{\left (b^{2} c d^{2} + 10 \, a b d^{3}\right )} e -{\left (4 \, b^{2} c^{2} d - 14 \, a b c d^{2} - 35 \, a^{2} d^{3}\right )} f\right )} x\right )} \sqrt{d x + c}\right )}}{105 \, d^{3}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(f*x+e)*(d*x+c)^(1/2)/x,x, algorithm="fricas")

[Out]

[1/105*(105*a^2*sqrt(c)*d^3*e*log((d*x - 2*sqrt(d*x + c)*sqrt(c) + 2*c)/x) + 2*(15*b^2*d^3*f*x^3 + 3*(7*b^2*d^
3*e + (b^2*c*d^2 + 14*a*b*d^3)*f)*x^2 - 7*(2*b^2*c^2*d - 10*a*b*c*d^2 - 15*a^2*d^3)*e + (8*b^2*c^3 - 28*a*b*c^
2*d + 35*a^2*c*d^2)*f + (7*(b^2*c*d^2 + 10*a*b*d^3)*e - (4*b^2*c^2*d - 14*a*b*c*d^2 - 35*a^2*d^3)*f)*x)*sqrt(d
*x + c))/d^3, 2/105*(105*a^2*sqrt(-c)*d^3*e*arctan(sqrt(d*x + c)*sqrt(-c)/c) + (15*b^2*d^3*f*x^3 + 3*(7*b^2*d^
3*e + (b^2*c*d^2 + 14*a*b*d^3)*f)*x^2 - 7*(2*b^2*c^2*d - 10*a*b*c*d^2 - 15*a^2*d^3)*e + (8*b^2*c^3 - 28*a*b*c^
2*d + 35*a^2*c*d^2)*f + (7*(b^2*c*d^2 + 10*a*b*d^3)*e - (4*b^2*c^2*d - 14*a*b*c*d^2 - 35*a^2*d^3)*f)*x)*sqrt(d
*x + c))/d^3]

________________________________________________________________________________________

Sympy [A]  time = 18.8006, size = 167, normalized size = 1.14 \begin{align*} \frac{2 a^{2} c e \operatorname{atan}{\left (\frac{\sqrt{c + d x}}{\sqrt{- c}} \right )}}{\sqrt{- c}} + 2 a^{2} e \sqrt{c + d x} + \frac{2 b^{2} f \left (c + d x\right )^{\frac{7}{2}}}{7 d^{3}} + \frac{2 \left (c + d x\right )^{\frac{5}{2}} \left (2 a b d f - 2 b^{2} c f + b^{2} d e\right )}{5 d^{3}} + \frac{2 \left (c + d x\right )^{\frac{3}{2}} \left (a^{2} d^{2} f - 2 a b c d f + 2 a b d^{2} e + b^{2} c^{2} f - b^{2} c d e\right )}{3 d^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**2*(f*x+e)*(d*x+c)**(1/2)/x,x)

[Out]

2*a**2*c*e*atan(sqrt(c + d*x)/sqrt(-c))/sqrt(-c) + 2*a**2*e*sqrt(c + d*x) + 2*b**2*f*(c + d*x)**(7/2)/(7*d**3)
 + 2*(c + d*x)**(5/2)*(2*a*b*d*f - 2*b**2*c*f + b**2*d*e)/(5*d**3) + 2*(c + d*x)**(3/2)*(a**2*d**2*f - 2*a*b*c
*d*f + 2*a*b*d**2*e + b**2*c**2*f - b**2*c*d*e)/(3*d**3)

________________________________________________________________________________________

Giac [A]  time = 1.73379, size = 271, normalized size = 1.86 \begin{align*} \frac{2 \, a^{2} c \arctan \left (\frac{\sqrt{d x + c}}{\sqrt{-c}}\right ) e}{\sqrt{-c}} + \frac{2 \,{\left (15 \,{\left (d x + c\right )}^{\frac{7}{2}} b^{2} d^{18} f - 42 \,{\left (d x + c\right )}^{\frac{5}{2}} b^{2} c d^{18} f + 35 \,{\left (d x + c\right )}^{\frac{3}{2}} b^{2} c^{2} d^{18} f + 42 \,{\left (d x + c\right )}^{\frac{5}{2}} a b d^{19} f - 70 \,{\left (d x + c\right )}^{\frac{3}{2}} a b c d^{19} f + 35 \,{\left (d x + c\right )}^{\frac{3}{2}} a^{2} d^{20} f + 21 \,{\left (d x + c\right )}^{\frac{5}{2}} b^{2} d^{19} e - 35 \,{\left (d x + c\right )}^{\frac{3}{2}} b^{2} c d^{19} e + 70 \,{\left (d x + c\right )}^{\frac{3}{2}} a b d^{20} e + 105 \, \sqrt{d x + c} a^{2} d^{21} e\right )}}{105 \, d^{21}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(f*x+e)*(d*x+c)^(1/2)/x,x, algorithm="giac")

[Out]

2*a^2*c*arctan(sqrt(d*x + c)/sqrt(-c))*e/sqrt(-c) + 2/105*(15*(d*x + c)^(7/2)*b^2*d^18*f - 42*(d*x + c)^(5/2)*
b^2*c*d^18*f + 35*(d*x + c)^(3/2)*b^2*c^2*d^18*f + 42*(d*x + c)^(5/2)*a*b*d^19*f - 70*(d*x + c)^(3/2)*a*b*c*d^
19*f + 35*(d*x + c)^(3/2)*a^2*d^20*f + 21*(d*x + c)^(5/2)*b^2*d^19*e - 35*(d*x + c)^(3/2)*b^2*c*d^19*e + 70*(d
*x + c)^(3/2)*a*b*d^20*e + 105*sqrt(d*x + c)*a^2*d^21*e)/d^21